package com.cangxuan.app.entity;

import java.time.LocalDateTime;

/**
 * 文章类
 */
public class Article {

    private int id;
    private String title;
    private String typeName;//文章类型名
    private String content;
    private LocalDateTime publishTime;

    public Article(int id, String title, String typeName, LocalDateTime publishTime) {
        this.id = id;
        this.title = title;
        this.typeName = typeName;
        this.publishTime = publishTime;
    }

    public Article(int id, String title,String content) {
        this.id = id;
        this.title=title;
        this.content = content;
    }



    public Article(int id, String title) {
        this.id = id;
        this.title = title;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public LocalDateTime getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(LocalDateTime publishTime) {
        this.publishTime = publishTime;
    }

    @Override
    public String toString() {
        return "Article{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", typeName='" + typeName + '\'' +
                ", content='" + content + '\'' +
                ", publishTime=" + publishTime +
                '}';
    }
}